<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <title>dc-example</title>
    <script src="/libs/dc-sdk/dc.min.js"></script>
    <script src="../dat.gui.min.js"></script>
    <link href="/libs/dc-sdk/dc.min.css" type="text/css" rel="stylesheet" />
    <link href="../index.css" type="text/css" rel="stylesheet" />
  </head>

  <body>
    <div id="viewer-container" class="viewer-container"></div>
    <script>
      DC.config.baseUrl = '../libs/dc-sdk/resources/'
      let viewer = new DC.Viewer('viewer-container')
      let baseLayer = DC.ImageryLayerFactory.createAMapImageryLayer({
        style: 'img',
        crs: 'WGS84',
      })
      viewer.addBaseLayer(baseLayer)

      let layer = new DC.VectorLayer('layer')
      viewer.addLayer(layer)

      let wall = new DC.Wall(
        '-107.0,43.0,100000.0;-97.0,43.0,100000.0;-97.0,40.0,100000.0;-107.0,40.0,100000.0;-107.0,43.0,100000.0'
      )
      wall.setStyle({
        material: new DC.WallLineTrailMaterialProperty({
          color: DC.Color.GREEN,
          speed: 4,
          repeat: {
            x: 2,
            y: 1.5,
          },
        }),
      })
      layer.addOverlay(wall)
      viewer.flyTo(layer)
    </script>
  </body>
</html>
